<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>元素</title>
	<style 	type="text/css">
		.box{
			width: 400px;
			height: 400px;
			background: red url() 0 0 no-repeat;
		}
	</style>
	<script type="text/javascript">
		window.onload = function () {

			var box = document.getElementById('box');


			box.onclick = function (argument) {

				// var data = box.textContent;
				// // alert(data)
				// box.style.width = '200px';
				// box.style.height = '200px';
				// box.style.display ='none';

				// alert(box.style.width);

				var width  =  window.getComputedStyle ? window.getComputedStyle(box,null).width :
				box.currentStyle.width;

				alert(width);

			}

			// var link = document.getElementById('link');

			// link.href='http://www.163.com';

			// alert(link.setAttribute('href','这个是一个盒子'));

		}

	</script>
</head>
<body>
	<div class="box"   id='box'>
		<p>这个是一个盒子<a xbs='学并思' href="http://www.baidu.com" id="link">百度一下</a></p>
	</div>
</body>
</html>